package com.jilefojing.beans.pojos.enhanced;

import java.util.Date;

import com.jilefojing.beans.enums.StatusEnumForPublish;
import com.jilefojing.beans.pojos.EBookChapter;
import com.jilefojing.beans.pojos.enhanced.base.BaseEnhanced;

/**
 * 
 * @author 作者 jgshun
 * @date 创建时间 2016年09月30日 20时22分10秒
 */
public class EnhancedEBookChapter extends BaseEnhanced {
	public EnhancedEBookChapter(EBookChapter eBookChapter) {
		// TODO 自动生成 细微误差自己调整
		if (eBookChapter.getId() != null) {
			this.id = eBookChapter.getId();
		}
		this.title = eBookChapter.getTitle();
		this.content = eBookChapter.getContent();
		this.extra = eBookChapter.getExtra();
		if (eBookChapter.getCreateUser() != null) {
			EnhancedUser enhancedUser = new EnhancedUser();
			enhancedUser.setId(eBookChapter.getCreateUser());
			this.enhancedCreateUser = enhancedUser;
		}
		this.createTime = eBookChapter.getCreateTime();
		this.updateTime = eBookChapter.getUpdateTime();
		if (eBookChapter.getSort() != null) {
			this.sort = eBookChapter.getSort();
		}
		if (eBookChapter.getBookId() != null) {
			EnhancedEBook enhancedEBook = new EnhancedEBook();
			enhancedEBook.setId(eBookChapter.getBookId());
			this.setEnhancedEBook(enhancedEBook);
		}

		if (eBookChapter.getStatus() != null) {
			this.status = StatusEnumForPublish.getStatusEnumByCode(eBookChapter
					.getStatus());
		}
	}

	public EnhancedEBookChapter() {
	}

	private long id;
	private String title;
	private String content;
	private String extra;
	private EnhancedUser enhancedCreateUser;
	private Date createTime;
	private Date updateTime;
	private double sort;
	private EnhancedEBook enhancedEBook;
	private StatusEnumForPublish status;

	private EnhancedStatistics enhancedStatistics;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getExtra() {
		return extra;
	}

	public void setExtra(String extra) {
		this.extra = extra;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public double getSort() {
		return sort;
	}

	public void setSort(double sort) {
		this.sort = sort;
	}

	public EnhancedEBook getEnhancedEBook() {
		return enhancedEBook;
	}

	public void setEnhancedEBook(EnhancedEBook enhancedEBook) {
		this.enhancedEBook = enhancedEBook;
	}

	public EnhancedStatistics getEnhancedStatistics() {
		return enhancedStatistics;
	}

	public void setEnhancedStatistics(EnhancedStatistics enhancedStatistics) {
		this.enhancedStatistics = enhancedStatistics;
	}

	public EnhancedUser getEnhancedCreateUser() {
		return enhancedCreateUser;
	}

	public void setEnhancedCreateUser(EnhancedUser enhancedCreateUser) {
		this.enhancedCreateUser = enhancedCreateUser;
	}

	public StatusEnumForPublish getStatus() {
		return status;
	}

	public void setStatus(StatusEnumForPublish status) {
		this.status = status;
	}

}